﻿<Window x:Class="Neudesic.Pulse.Notifier.Shell"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:infra="clr-namespace:Neudesic.Pulse.Infrastructure"
        xmlns:composite="http://www.codeplex.com/CompositeWPF" 
        xmlns:design="clr-namespace:Neudesic.Pulse.ViewModels.Design"
        Title="Neudesic Pulse Notifier"
        WindowStyle="ThreeDBorderWindow"
        mc:Ignorable="d"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        Height="350"
        Width="525" Icon="file:///C:/dev/Neudesic.Pulse/Main/Samples/Neudesic.Pulse.TaskbarNotifier/Resources/ApplicationIcon.ico">

    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
        <StackPanel d:DataContext="{d:DesignInstance design:ShellViewModel, IsDesignTimeCreatable=True}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition MaxHeight="100" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid Grid.Row="0" Visibility="{Binding Exceptions.Count, Converter={StaticResource CollectionCountVisibilityConverter}}" Background="{StaticResource ErrorBrush}">
                    <StackPanel>
                        <Button x:Name="btnClear" Command="{Binding Path=ClearCommand}" HorizontalAlignment="Right" Background="Transparent" BorderBrush="Transparent">X</Button>
                        <ListBox x:Name="errorList" ItemsSource="{Binding Exceptions, Mode=OneWay}" Background="Transparent" BorderBrush="Transparent">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Message}" />
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </StackPanel>
                </Grid>
                <Grid Grid.Row="1">
                    <StackPanel>
                        <ContentControl x:Name="StatusInputContent" composite:RegionManager.RegionName="{x:Static infra:RegionNames.StatusInputRegion}" />
                        <ContentControl x:Name="ActivityContent" composite:RegionManager.RegionName="{x:Static infra:RegionNames.ActivityRegion}" />
                    </StackPanel>
                </Grid>
            </Grid>
        </StackPanel>
    </ScrollViewer>

</Window>
